import navBottom from '../common/nav-bottom.vue'
import './noticeDetails.scss';
import XHeader from 'vux/src/components/x-header/index.vue'
import CONSTANT from '@/common/constants.js';
import http from '@/common/http.js';

export default {
  name: 'noticeDetails',
  components: {navBottom, XHeader},
  data () {
    return {
      id: '',
      obj: {
        createTime: '',
        msgContent: ''
      }
    }
  },
  mounted () {
    if (this.$emit('ifOpenid')) {
      this.$emit('ifOpenid', this.$route.path)
    }
    this.id = this.$route.query.id
    http.post(CONSTANT.QQCMSGSEND_DETAIL, {id: this.id}, (res) => {
      if (res.code == 200) {
        console.log(res)
        this.obj.createTime = res.obj.createTime
        this.obj.msgContent = res.obj.msgContent
      } else {
        console.log('出错了')
      }
    })
  },
  methods: {
    comeBack () {
      window.history.back()
    }
  }
}
